package com.newly.common.base.entity.sys.tenant.bo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.newly.common.base.entity.sys.tenant.po.TenantPo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @program: newly-parent
 * @remark:
 * @author: guan
 * @create: 2021-12-20 21:00
 */
@Data
public class SimpleTenantBo {
    /**
     * 租户id
     */
    @ApiModelProperty("租户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    private String username;

    /**
     * 昵称
     */
    @ApiModelProperty("昵称")
    private String nickname;

    public SimpleTenantBo(TenantPo tenantPo) {
        this.id = tenantPo.getId();
        this.username = tenantPo.getUsername();
        this.nickname = tenantPo.getNickname();
    }

    public SimpleTenantBo() {
    }
}
